![]() |
SoundComponentGetInfo |
||||
Header: | Sound.h | Carbon status: | Supported | |
Obtains information about the capabilities of your component. A sound component must implement the SoundComponentGetInfo function.
ComponentResult SoundComponentGetInfo ( ComponentInstance ti, SoundSource sourceID, OSType selector, void *infoPtr );
A component instance that identifies your sound component.
A source ID for a source component chain.
A sound component information selector. See
On output, a pointer to the information requested by the caller.
Returns noErr if successful or an appropriate result code otherwise.
Your SoundComponentGetInfo function returns information about your sound component. The sourceID parameter specifies the sound source to return information about, and the selector parameter specifies the kind of information to be returned. If the information occupies 4 or fewer bytes, it should be returned in the location pointed to by the infoPtr parameter.
The structure referred to by the infoPtr parameter consists of a count and a handle to a variable-sized array. The count field specifies the number of elements in the array to which handle is a handle. It is your component’s responsibility to allocate the block of data referenced by that handle, but it is the caller’s responsibility to dispose of that handle once it is finished with it.
The data type of the array elements depends on the kind of information being returned. For example, the selector siSampleSizeAvailable indicates that you should return a list of the sample sizes your component can support. You return the information by passing back, in the infoPtr parameter, a pointer to an integer followed by a handle to an array of integers.
If your component cannot provide the information specified by the selector parameter, it should pass the selector to its source component.
Your SoundComponentGetInfo function is not called at interrupt time if it is passed a selector that might cause it to allocate memory for the handle in the component information list.
Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)